]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
padOsd: Work around xgettext confusion
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 29 Oct 2019 13:13:38 +0000 (14:13 +0100)
committerFlorian Müllner <florian.muellner@gmail.com>
Tue, 29 Oct 2019 17:38:06 +0000 (17:38 +0000)
Similar to the previous work-around, xgettext gets thrown off by
embedded quotes in template strings, in particular where a template
"breaks up" a pair of quotes.

Throw in some more comments to make xgettext happy, but whoever makes
the gettext toolchain not depend on fragile regular expressions will
be drowned in beverages of their choice ...

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/792

js/ui/padOsd.js

index b36c00b48949b28a5a0e28f2ddc4924a092f5cc3..edb4fbea0fead2928f9e79b5ee5adb79478819aa 100644 (file)
@@ -350,7 +350,9 @@ var PadDiagram = GObject.registerClass({
         return ('<?xml version="1.0" encoding="UTF-8" standalone="no"?>' +
                 '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" ' +
                 'xmlns:xi="http://www.w3.org/2001/XInclude" ' +
-                `width="${this._imageWidth}" height="${this._imageHeight}"> ` +
+                `width="${ // " (give xgettext the paired quotes it expects)
+                    this._imageWidth
+                }" height="${this._imageHeight}"> ` + // "
                 '<style type="text/css">');
     }